package server;

import java.rmi.RemoteException;

public class ThreadSendCandidature extends Thread {
	
	String name;
	NodeRecord node;
	int ids,Lmaxs,num;
	boolean check=true;
	
	ThreadSendCandidature(NodeRecord node, int ids,int num, int Lmaxs,String name){
		super();
		this.num=num;
		this.name=name;
		this.node=node;
		this.ids=ids;
		this.Lmaxs=Lmaxs;
	}
	
	public boolean getCheck(){
		return this.check;
	}

	public void run() {
		while(check==true){
		try {
			System.out.println("Hm"+check);
			node.getInterface().processCandidatire(ids, num, Lmaxs, name);
			this.interrupt();
		} catch (RemoteException e) {
			e.printStackTrace();
		} 
		check=false;
		}
	}
}
